using Cheng;
using Cheng.UI;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class StartForm : UGuiForm
{
    private Button startButton;
    protected override void OnInit(object userData)
    {
        base.OnInit(userData);
        //GameFirst first= (GameFirst)userData;
        startButton = transform.Find("StartGame").GetComponent<Button>();
        //startButton.AddClickMethod(first.LoadPlayerSoldier);
        startButton.AddClickMethod(OnClickStartGame);
    }

    private void OnClickStartGame(GameObject go)
    {
        
      
        (GameEntry.Procedure.GetProcedure<ProcedurePreload>() as ProcedurePreload).OnStartGame();
        GameEntry.UI.CloseUIForm(UIFormId.StartForm);
        //GameEntry.UI.OpenUIForm(UIFormId.ArrangeForm);
        //GameEntry.UI.OpenUIForm(UIFormId.SlidingScreenForm);

    }
}
